#pragma once

#ifdef BUILD_WITH_FACEBOOK

#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkRequest>
#include <QtNetwork/QNetworkReply>

#include <QtCore/QMap>
#include <QtCore/QCryptographicHash>
#include <QtCore/QDebug>

class FacebookAPIManager : public QObject
{
Q_OBJECT

public:
	FacebookAPIManager();
	~FacebookAPIManager();

	bool callMethod(const QString& method, const QMap<QString, QString>& params);

	void setApiKey(const QString& apiKey);
	void setSessionKey(const QString& sessionKey);
	void setUid(const QString& uid);
	void setSecret(const QString& secret);

public slots:
	void readData();

private:
	QString m_apiKey;
	QString m_sessionKey;
	QString m_uid;
	QString m_secret;

	QNetworkAccessManager* m_manager;

	unsigned int m_currentCallId;
};

#endif